﻿component  output="false" 
{    
    this.SCFAD = CreateObject("component", "code_lib.SCF_ActiveDirectory");//Active Directory   
    this.SCFPS = CreateObject("component", "code_lib.SCF_PowerShell");//Powershell Service
    this.ADGroupTypes = {        
        '-2147483646' = 'Global Security Group',
        '-2147483644' = 'Local Security Group',
        '-2147483643' = 'BuiltIn Group',
        '-2147483640' = 'Universal Security Group',        
        '2' = 'Global Distribution Group',
        '4' = 'Local Distribution Group',
        '8' = 'Universal Distribution Group',
        '-42' = 'None'
    };

	public ActiveDirectory function init()
	{
        return this;    
	}
    
    public array function parseGroupDNString( string DN="" ){
        return REMatch("\bCN=(.*?)DC=com", arguments.DN );
    }    
    
    public array function parseUserDNString( string DN="" ){
        return REMatch("\bCN=(.*?)DC=com", arguments.DN );
    }

}